{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c834b673",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Author : jiang\n",
    "# week 07\n",
    "\n",
    "stu_id = [95.97,90,90,97,88,90]\n",
    "\n",
    "#删除97 的值\n",
    "#方法1： remove 怎么删干净？\n",
    "while True:\n",
    "    if 97 in stu_id:\n",
    "        stu_id.remove(97)\n",
    "    else:\n",
    "        break\n",
    "print(stu_id)\n",
    "\n",
    "#方法2：pop\n",
    "# print(stu_id.index(97))\n",
    "for index,item in enumerate(stu_id):\n",
    "    print(index,item)\n",
    "    if item == 97:\n",
    "        stu_id.pop(index)\n",
    "print(stu_id)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
